﻿using System;
using Orchard.Security;
namespace Hazdesign.TwitterRules.Models {
    public class Tweet : Message {
        private readonly int MAX_TWEET_LENGTH = 140;
        public Tweet(IUser user, string message) : base(user, message){
        }

        public override string PublishMessage {
            get { return base.PublishMessage.Length > MAX_TWEET_LENGTH ? base.PublishMessage.Substring(0, MAX_TWEET_LENGTH) : base.PublishMessage; }
            protected set { base.PublishMessage = value; }
        }
    }
}
